clear; clc; close all;

a1_1 = 0.01;    % 对应 F1.1(x)= x*(1-x)
a1_2 = -0.02;   % 对应 F1.2(x)= sin(x)
a1_3 = 0.03;    % 对应 F1.3(x)= |x|
b = 2.6;
c = 1.1;
d = 0.001;

N = 50000;       % 迭代步数
discard = 500;  % 丢弃前500步作为暂态

x0 = 1;
y0 = 2;

% 分配空间
x = zeros(N,1);
y = zeros(N,1);
x(1) = x0;
y(1) = y0;

for k = 1 : N-1
    % 计算三个非线性项
    F1_1 = x(k) * (1 - x(k));
    F1_2 = sin(x(k));
    F1_3 = abs(x(k));
  
    % 更新 x，根据 MNFM7 模型公式
    x(k+1) = a1_1 * F1_1 + a1_2 * F1_2 + a1_3 * F1_3 + b * sin(c * cos(y(k)) * x(k)) + d;
    % 更新 y，y 的更新始终为 y(k+1)= y(k) + x(k)
    y(k+1) = y(k) + x(k);
end

figure('Color','w');
plot(x(discard+1:end), y(discard+1:end), '.', 'MarkerSize', 2);
xlabel('x','FontSize',12);
ylabel('y','FontSize',12);
title('Iterative Plot for MNFM7','FontSize',14);
grid on; box on;
